| | | | | | | | | | . | | BJ4 Sections (Significant changes in bold) | BJ3 | Notes | BJ4 Review Exercises | BJ3 | | BJ4 Programming Exercises | BJ3 | . | | | | | | | | | | . | General Changes | | | Instance variables on top | | | | | | . | | | | "Instance variable", not "instance field" | | | | | | . | | | | Carefully use JLS "inheritance" terminology (i.e. instance variables are never "inherited") | | | | | | . | | | | Syntax diagrams have examples | | | | | | . | | | | | | | | | | . | Chapter 1 | 1 | 1 | | 1 | 1 | | 1 | 1 | . | | 2 | 2 | | 2 | 2 | | 2 | | . | | 3 | 3 | | 3 | 8 | | 3 | 2 | . | | 4 | 4 | | 4 | 9 | | 4 | | . | | 5 | 6 | | 5 | 10 | | 5 | 3 | . | | 6 | 6 | | 6 | 11 | | 6 | 4 | . | | 7 | 7 | | 7 | 12 | | 7 | | . | | 8 | | New discussion of pseudocode | 8 | | | 8 | 5 | . | | | | | 9 | | | 9 | 7 | . | | | | | 10 | | | 10 | 8 | . | | | | | 11 | | | 11 | | . | | | | | 12 | | | | | . | | | | | 13 | | | | |
|
| | | | | | | | | | . | | | | | | | | | | . | Chapter 2 | 1 | 1 | Separate sections for types and variables | 1 | 1 | | 1 | 1 | . | | 2 | 1 | | 2 | 2 | | 2 | 2 | . | | 3 | 2 | | 3 | 3 | | 3 | 3 | . | | 4 | 3 | | 4 | 4 | | 4 | | . | | 5 | 4 | | 5 | 5 | | 5 | 4 | . | | 6 | 6 | | 6 | 7 | | 6 | | . | | 7 | 7 | | 7 | 8 | | 7 | 5 | . | | 8 | 9 | Switched order of sections | 8 | | | 8 | | . | | 9 | 8 | | 9 | | | 9 | 6 | . | | 10 | 10 | | 10 | | | 10 | 7 | . | | 11 | 11 | | 11 | | | 11 | 8 | . | | 12 | 12 | | 12 | 9 | | 12 | 9 | . | | 13 | 13 | | 13 | 10 | | 13 | 10 | . | | | | | 14 | 11 | | 14 | 11 | . | | | | | 15 | 14 | | 15 | 12 | . | | | | | 16 | 15 | | 16 | 13 | . | | | | | 17 | 16 | | 17 | 14 | . | | | | | 18 | 17 | | 18 | 15 | . | | | | | 19 | 18 | | | |
|
| | | | | | | | | | . | | | | | 20 | 19 | | | | . | | | | | | | | | | . | Chapter 3 | 1 | 4 | New TallyCounter example | 1 | | | 1 | 1 | . | | 2 | | | 2 | | | 2 | 2 | . | | 3 | 2 | | 3 | | | 3 | 3 | . | | 4 | 3 | | 4 | | | 4 | | . | | 5 | 5 | | 5 | | | 5 | | . | | 6 | 6 | | 6 | | | 6 | 4 | . | | 7 | 7 | | 7 | | | 7 | 5 | . | | 8 | 8 | | 8 | 1 | | 8 | 6 | . | | 9 | 9 | | 9 | | | 9 | 7 | . | | | | | 10 | 4 | | 10 | 8 | . | | | | | 11 | 7 | | 11 | 9 | . | | | | | 12 | 8 | | 12 | 10 | . | | | | | 13 | 9 | | 13 | 11 | . | | | | | 14 | | | 14 | 12 | . | | | | | 15 | | | 15 | 13 | . | | | | | 16 | | | 16 | 14 | . | | | | | 17 | | | 17 | 15 | . | | | | | 18 | 13 | | 18 | 16 |
|
| | | | | | | | | | . | | | | | 19 | 14 | | 19 | 17 | . | | | | | 20 | 15 | | 20 | 18 | . | | | | | | | | 21 | 19 | . | | | | | | | | 22 | 20 | . | | | | | | | | | | . | Chapter 4 | 1 | 1 | | 1 | 1 | | 1 | 1 | . | | 2 | 2 | | 2 | 2 | | 2 | 2 | . | | 3 | 3, 4 | Assignment now in 3.1, increment/decrement in 4.3 | 3 | 3 | | 3 | 3 | . | | 4 | 5 | | 4 | 4 | | 4 | 4 | . | | 5 | 6 | | 5 | 5 | | 5 | 5 | . | | 6 | 7 | | 6 | 6 | | 6 | 6 | . | | | | | 7 | 7 | | 7 | 7 | . | | | | | 8 | 8 | | 8 | 8 | . | | | | | 10 | 9 | | 9 | 9 | . | | | | | 11 | 10 | | 10 | 10 | . | | | | | 12 | 11 | | 11 | 11 | . | | | | | 13 | 12 | | 12 | NEW | . | | | | | 14 | 13 | | 13 | 12 | . | | | | | 15 | 14 | | 14 | 13 | . | | | | | 16 | 15 | | 15 | 14 |
|
| | | | | | | | | | . | | | | | 17 | part 16 | | 16 | 15 | . | | | | | 18 | part 16 | | 17 | 16 | . | | | | | | | | 18 | 17 | . | | | | | | | | 19 | 18 | . | | | | | | | | | | . | Chapter 5 | No changes | | | 1 | NEW | | 1 | 1 | . | | | | | 2 | 1 b,c,h | | 2 | 2 | . | | | | | 3 | 1 i | | 3 | 3 | . | | | | | 4 | 1 d,e,f,g | | 4 | 5 | . | | | | | 5 | 2 | | 5 | 6 | . | | | | | 6 | 3 | | 6 | 7 | . | | | | | 7 | 4 | | 7 | 8 | . | | | | | 8 | 5 | | 8 | | . | | | | | 9 | 6 | | 9 | | . | | | | | 10 | NEW | | 10 | | . | | | | | 11 | NEW | | 11 | | . | | | | | 12 | NEW | | 12 | 9 | . | | | | | 13 | NEW | | 13 | 10 | . | | | | | 14 | 8 | | 14 | 11 | . | | | | | 15 | 9 | | 15 | 12 |
|
| | | | | | | | | | . | | | | | 16 | 10 | | 16 | 13 | . | | | | | 17 | 11 | | 17 | 14 | . | | | | | 18 | 12 | | 18 | 15 | . | | | | | 19 | 13 | | 19 | 16 | . | | | | | 20 | 14 | | 20 | 17 | . | | | | | 21 | 15 | | | | . | | | | | 22 | 16 | | | | . | | | | | 23 | 17 | | | | . | | | | | 24 | 18 | | | | . | | | | | 25 | 19 | | | | . | | | | | 26 | NEW | | | | . | | | | | | | | | | . | Chapter 6 | 1 | 1 | | No changes | | | 1 | | . | | 2 | 2 | | | | | 2 | | . | | 3 | | New section on common loop algorithms | | | | 3 | 1 | . | | 4 | 3 | | | | | 4 | 2 | . | | 5 | 5 | | | | | 5 | 3 | . | | 6 | 6 | Sample debugging session is now on web | | | | 6 | 4 | . | | | | | | | | 7 | 5 | . | | | | | | | | 8 | 6 |
|
| | | | | | | | | | . | | | | | | | | 9 | 7 | . | | | | | | | | 10 | 8 | . | | | | | | | | 11 | 9 | . | | | | | | | | 12 | 10 | . | | | | | | | | 13 | 11 | . | | | | | | | | 14 | 12 | . | | | | | | | | 15 | 13 | . | | | | | | | | 16 | 14 | . | | | | | | | | 17 | 15 | . | | | | | | | | 18 | 16 | . | | | | | | | | 19 | 17 | . | | | | | | | | 20 | 18 | . | | | | | | | | 21 | 19 | . | | | | | | | | | | . | Chapter 7 | 1 | 1 | | 1 | 7.1 | | 1 | 7.2 | . | | 2 | 2 | | 2 | 7.2 | | 2 | 7.3 | . | | 3 | 3 | | 3 | 7.3 | | 3 | 7.4 | . | | 4 | 4 | | 4 | 7.4 | | 4 | 7.5 | . | | 5 | | Partially filled arrays broken into separate section | 5 | 7.5 | | 5 | 7.6 | . | | 6 | | New section on common array algorithms | 6 | 7.6 | | 6 | 7.7 |
|
| | | | | | | | | | . | | 7 | 7 | | 7 | 7.7 | | 7 | 7.8 | . | | 8 | 6 | | 8 | 7.8 | | 8 | 7.9 | . | | | | | 9 | 7.9 | | 9 | | . | | | | | 10 | 7.1 | | 10 | | . | | | | | 11 | 7.11 | | 11 | | . | | | | | 12 | 7.12 | | 12 | New | . | | | | | 13 | New | | 13 | 7.1 | . | | | | | 14 | New | | 14 | 7.11 | . | | | | | 15 | New | | 15 | 7.12 | . | | | | | 16 | New | | 16 | 7.13 | . | | | | | 17 | 7.15 | | 17 | 7.14 | . | | | | | 18 | 7.17 and new | | 18 | 7.15 | . | | | | | 19 | 7.19 | | 19 | 7.16 | . | | | | | 20 | 7.2 | | 20 | 7.2 | . | | | | | | | | 21 | 7.18 | . | | | | | | | | 22 | 7.19 | . | | | | | 1 | 1 | | | | . | Chapter 8 | No changes | | | 2 | 2 | | 1 | 1 | . | | | | | 3 | 3 | | 2 | 2 | . | | | | | 4 | 4 | | 3 | 3 |
|
| | | | | | | | | | . | | | | | 5 | 5 | | 4 | 4 | . | | | | | 6 | 6 | | 5 | 5 | . | | | | | 7 | 7 | | 6 | 6 | . | | | | | 8 | 8 | | 7 | new | . | | | | | 9 | 9 | | 8 | new | . | | | | | 10 | 10 | | 9 | 7 | . | | | | | 11 | 11 | | 10 | 8 | . | | | | | 12 | 12 | | 11 | 9 | . | | | | | 13 | 13 | | 12 | 10 | . | | | | | 14 | 14 | | 13 | 11 | . | | | | | 15 | 15 | | 14 | 12 | . | | | | | 16 | 16 | | 15 | 13 | . | | | | | 17 | 17 | | 16 | 14 | . | | | | | 18 | 18 | | 17 | 15 | . | | | | | 19 | 19 | | 18 | 16 | . | | | | | 20 | 20 | | 19 | 17 | . | | | | | 21 | 21 | | 20 | 18 | . | | | | | 22 | 22 | | | | . | | | | | 23 | 23 | | | | . | | | | | 24 | 24 | | | |
|
| | | | | | | | | | . | | | | | 25 | 25 | | | | . | | | | | 26 | 26 | | | | . | | | | | 27 | 27 | | | | . | | | | | 28 | 28 | | | | . | | | | | 29 | 31 | | | | . | | | | | 30 | 32 | | | | . | | | | | 31 | 33 | | | | . | | | | | | | | | | . | Chapter 9 | 1 | 1 | Changed focus to algorithm reuse | No changes | | | 1 | 1 | . | | 2 | 2 | | | | | 2 | 2 | . | | 3 | 3 | | | | | 3 | 3 | . | | 4 | 4 | | | | | 4 | 4 | . | | 5 | 5 | | | | | 5 | 5 | . | | 6 | | New section on mock objects | | | | 6 | 6 | . | | 7 | 6 | | | | | 7 | 7 | . | | 8 | 7 | | | | | 8 | new | . | | 9 | 8 | | | | | 9 | new | . | | 10 | 9 | | | | | 10 | new | . | | 11 | 10 | | | | | 11 | new | . | | | | | | | | 12 | 8 |
|
| | | | | | | | | | . | | | | | | | | 13 | 9 | . | | | | | | | | 14 | 10 | . | | | | | | | | 15 | 11 | . | | | | | | | | 16 | 12 | . | | | | | | | | 17 | new | . | | | | | | | | 18 | new | . | | | | | | | | 19 | 13 | . | | | | | | | | 20 | 14 | . | | | | | | | | 21 | 15 | . | | | | | | | | 22 | 16 | . | | | | | | | | 23 | 17 | . | | | | | | | | 24 | 18 | . | | | | | | | | 25 | 19 | . | | | | | | | | 26 | 20 | . | | | | | | | | 27 | 26 | . | | | | | | | | 28 | 21 | . | | | | | | | | 29 | 22 | . | | | | | | | | 30 | 23 | . | | | | | | | | 31 | 24 | . | | | | | | | | 32 | 25 |
|
| | | | | | | | | | . | | | | | | | | 33 | 10.16 | . | | | | | | | | 34 | 10.17 | . | | | | | | | | 35 | 10.18 | . | | | | | | | | | | . | Chapter 10 | 1 | 1, 2 | | No changes | | | 1 | 1 | . | | 2 | 3 | | | | | 2 | 2 | . | | 3 | 3 | Separate section on overriding | | | | 3 | new | . | | 4 | 4 | | | | | 4 | new | . | | 5 | 5 | | | | | 5 | new | . | | 6 | 6 | | | | | 6 | new | . | | 7 | 8 | | | | | 7 | new | . | | 8 | 9 | Text components moved to ch. 18 | | | | 8 | new | . | | | | | | | | 9 | new | . | | | | | | | | 10 | 3 | . | | | | | | | | 11 | 4 | . | | | | | | | | 12 | 5 | . | | | | | | | | 13 | 7 | . | | | | | | | | 14 | 8 | . | | | | | | | | 15 | 15 | . | | | | | | | | 16 | 20 |
|
| | | | | | | | | | . | | | | | | | | | | . | Chapter 11 | 1 | 1 | | 1 | 1 | | 1 | 1 | . | | 2 | | New section on strategies for text processing | 2 | 2 | | 2 | 2 | . | | 3 | 2 | | 3 | 3 | | 3 | 3 | . | | 4 | 3 | | 4 | 4 | | 4 | 4 | . | | 5 | 4 | | 5 | 5 | | 5 | 5 | . | | 6 | 5 | | 6 | 6 | | 6 | 6 | . | | 7 | 6 | | 7 | 7 | | 7 | 7 | . | | 8 | 7 | | 8 | 8 | | 8 | | . | | | | | 9 | 9 | | 9 | | . | | | | | 10 | 10 | | 10 | | . | | | | | 11 | 11 | | 11 | 8 | . | | | | | 12 | 12 | | 12 | 9 | . | | | | | 13 | 13 | | 13 | 10 | . | | | | | 14 | 14 | | 14 | 11 | . | | | | | 15 | 15 | | 15 | 12 | . | | | | | 16 | 16 | | 16 | 13 | . | | | | | 17 | 17 | | 17 | 14 | . | | | | | 18 | new | | 18 | 15 | . | | | | | 19 | 19 | | | |
|
| | | | | | | | | | . | | | | | 20 | 20 | | | | . | | | | | | | | | | . | Chapter 12 | No change | | | No change | | | No change | | . | | | | | | | | | | . | Chapter 13 | 1 | 1 | | No change | | | No change | | . | | 2 | 3 | | | | | | | . | | 3 | 4 | | | | | | | . | | 4 | 2 | Moved permutations section | | | | | | . | | 5 | 5 | | | | | | | . | | | | | | | | | | . | Chapter 14 | No change | | | No change | | | No change | | . | | | | | | | | | | . | Chapter 15 | No change | | | 1 | 1 | | 1 | 1 | . | | | | | 2 | 2 | | 2 | 2 | . | | | | | 3 | 3 | | 3 | 3 | . | | | | | 4 | 4 | | 4 | 4 | . | | | | | 5 | 5 | | 5 | 5 | . | | | | | 6 | 6 | | 6 | 6 | . | | | | | 7 | 7 | | 7 | 7 | . | | | | | 8 | 8 | | 8 | 8 |
|
| | | | | | | | | | . | | | | | 9 | 9 | | 9 | 9 | . | | | | | 10 | 10 | | 10 | new | . | | | | | 11 | 11 | | 11 | new | . | | | | | 12 | 12 | | 12 | new | . | | | | | 13 | | | 13 | new | . | | | | | 14 | | | 14 | 10 | . | | | | | | | | 15 | 11 | . | | | | | | | | 16 | 12 | . | | | | | | | | 17 | 13 | . | | | | | | | | 18 | 14 | . | | | | | | | | 19 | 15 | . | | | | | | | | 20 | new | . | | | | | | | | 21 | new | . | | | | | | | | 22 | new | . | | | | | | | | 23 | new | . | | | | | | | | 24 | 16 | . | | | | | | | | | | . | Chapter 16 | 1 | 1, 7 | | No change | | | 1 | 16.1 | . | | 2 | 2, 7 | | | | | 2 | 16.2 | . | | 3 | 3 | | | | | 3 | 16.12 |
|
| | | | | | | | | | . | | 4 | 4 | | | | | 4 | new | . | | 5 | 5 | | | | | 5 | new | . | | 6 | 6 | | | | | 6 | new | . | | 7 | 8 | | | | | 7 | 16.4 | . | | 8 | 9 | | | | | 8 | 16.5 | . | | 9 | 10 | | | | | 9 | 16.3 | . | | | | | | | | 10 | 16.6 | . | | | | | | | | 11 | 16.7 | . | | | | | | | | 12 | new | . | | | | | | | | 13 | new | . | | | | | | | | 14 | new | . | | | | | | | | 15 | 16.9 | . | | | | | | | | 16 | 16.1 | . | | | | | | | | 17 | 16.11 | . | | | | | | | | 18 | 16.13 | . | | | | | | | | 19 | 16.14 | . | | | | | | | | 20 | 16.15 | . | | | | | | | | 21 | 16.16 | . | | | | | | | | 22 | 16.17 | . | | | | | | | | 23 | 16.18 |
|
| | | | | | | | | | . | | | | | | | | 24 | 16.19 | . | | | | | | | | 25 | 16.2 | . | | | | | | | | 26 | 16.21 | . | | | | | | | | | | . | Chapter 17 | No change | | | 1 | 1 | | 1 | 1 | . | | | | | 2 | 2 | | 2 | 2 | . | | | | | 3 | 3 | | 3 | 3 | . | | | | | 4 | 4 | | 4 | 4 | . | | | | | 5 | 5 | | 5 | 5 | . | | | | | 6 | 6 | | 6 | 6 | . | | | | | 7 | 7 | | 7 | 7 | . | | | | | 8 | 8 | | 8 | 8 | . | | | | | 9 | 9 | | 9 | new | . | | | | | 10 | 10 | | 10 | 9 | . | | | | | 11 | 11 | | 11 | 10 | . | | | | | 12 | 12 | | 12 | 11 | . | | | | | 13 | 13 | | 13 | 12 | . | | | | | 14 | new | | 14 | 13 | . | | | | | | | | | | . | Chapter 18 | 1 | | Moved from inheritance chapter | 1 | 10.18 | | 1 | 10.9 |
|
| | | | | | | | | | . | | 2 | | Moved from inheritance chapter | 2 | 10.19 | | 2 | 10.1 | . | | 3 | 1 | | 3 | 18.1 | | 3 | 10.11 | . | | 4 | 2 | | 4 | 18.2 | | 4 | 10.12 | . | | 5 | 3 | | 5 | 18.3 | | 5 | 10.13 | . | | 6 | 4 | | 6 | 18.4 | | 6 | 10.14 | . | | | | | 7 | 18.5 | | 7 | 10.19 | . | | | | | 8 | 18.6 | | 8 | 18.1 | . | | | | | 9 | 18.7 | | 9 | 18.2 | . | | | | | 10 | 18.8 | | 10 | 18.3 | . | | | | | 11 | 18.9 | | 11 | 18.4 | . | | | | | 12 | 18.1 | | 12 | 18.5 | . | | | | | 13 | 18.11 | | 13 | 18.6 | . | | | | | 14 | 18.12 | | 14 | 18.7 | . | | | | | 15 | 18.13 | | 15 | 18.8 | . | | | | | 16 | 18.14 | | 16 | 18.9 | . | | | | | 17 | 18.15 | | 17 | 18.1 | . | | | | | 18 | 18.16 | | 18 | 18.11 | . | | | | | 19 | 18.17 | | | | . | | | | | 20 | 18.18 | | | | . | | | | | | | | | |
|
| | | | | | | | | | . | Chapter 19 | 1 | 1 | | No change | | | No change | | . | | 2 | 2 | Changed focus to binary I/O | | | | | | . | | 3 | 3 | | | | | | | . | | 4 | 4 | | | | | | | . | | | | | | | | | | . | Chapter 20 | No change | | | No change | | | No change | | . | | | | | | | | | | . | Chapter 21 | No change | | | No change | | | No change | | . | | | | | | | | | | . | Chapter 22 | No change | | | No change | | | No change | | . | | | | | | | | | | . | Chapter 23 | No change | | | No change | | | No change | | . | | | | | | | | | | . | Chapter 24 | 1 | 1 | | No change | | | No change | | . | | 2 | 2 | | | | | | | . | | 3 | 3, 4 | Simplified because of JSF 2 | | | | | | . | | 4 | 5 | | | | | | | . | | 5 | 6 | | | | | | | . | | 6 | 7 | | | | | | |
|